package com.code.springboot3.model.dto;

import jakarta.validation.constraints.NotEmpty;

import jakarta.validation.constraints.Pattern;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserFromDto {
    @NotEmpty(message = "用户名不能为空")
    @Pattern(regexp = "^\\S{5,16}$",message = "用户名需要5-16位")
    private String username;
    @NotEmpty(message = "密码不能为空")
    @Pattern(regexp = "^\\S{5,16}$",message = "密码需要5-16位")
    private String password;
}
